<template>
  <div>
    <div style="margin-bottom: 10px; font-size: 14px; font-weight: 250; margin-left: 10px">
      <el-icon><DataLine /></el-icon>
      成绩查询
    </div>
    <el-card>
      <el-table :data="data.tableData" stripe style="width: 100%">
        <el-table-column prop="id" label="选课ID" />
        <el-table-column prop="courseName" label="课程名" />
        <el-table-column prop="teacherName" label="教师" />
        <el-table-column prop="credit" label="学分" />
        <el-table-column prop="dailyScore" label="日常成绩" />
        <el-table-column prop="examScore" label="考试成绩" />
        <el-table-column prop="score" label="总成绩" />
      </el-table>
    </el-card>
  </div>
</template>

<script setup>

import {reactive} from "vue";
import request from "@/utils/request.js";

const data = reactive({
      tableData: [],
      student: JSON.parse(localStorage.getItem("student")),
})

request.get("student/selectAllExam/" + data.student.id).then(res => {
  data.tableData = res.data
})

</script>